package com.wss.controller;


import com.wss.service.RankService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@Controller
public class RankController {

    @Autowired
    private RankService rankService;

    @GetMapping("/rank")
    public Object rankOfSongListId(HttpServletRequest req){
        String rankId = req.getParameter("songListId");
        return rankService.rankOfSongListId(Long.parseLong(rankId));
    }
}
